package cn.explink.dop.entity.vo;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 *
 * @ClassName: OrderStatusRecordVO
 * @Description: 订单状态记录
 *
 * @author 孟凡岭
 * @date 2015年4月22日 下午4:48:15
 * @since AR1.0
 */
@Entity
@Table(name = "or_order_status_record")
public class OrderStatusRecordVO implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = -4127237393506493618L;
	/**
	 * 主键
	 */
	private String id;
	/**
	 * 关联OrderVO主键
	 */
	private String orderId;
	/**
	 * 状态改变时间
	 */
	private Date changTime;
	/**
	 * 备注
	 */
	private String recordDesc;

	@Id
	@GenericGenerator(name = "uuid", strategy = "uuid")
	@GeneratedValue(generator = "uuid")
	@Column(length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "order_id", length = 32)
	public String getOrderId() {
		return this.orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@Column(name = "change_Time")
	public Date getChangTime() {
		return this.changTime;
	}

	public void setChangTime(Date changTime) {
		this.changTime = changTime;
	}

	@Column(name = "record_desc", length = 600)
	public String getRecordDesc() {
		return this.recordDesc;
	}

	public void setRecordDesc(String recordDesc) {
		this.recordDesc = recordDesc;
	}

	@Transient
	public String getChangTimeStr() {
		return new SimpleDateFormat("yyyy-MM-dd HH:mm").format(this.getChangTime());
	}

}
